package meiyunting.shiwuzhaoling.config;

import org.springframework.context.annotation.Configuration;

/**
 * 断路器配置类
 * 目前暂时禁用，等依赖问题解决后再启用
 */
@Configuration
public class ResilienceConfig {
    
    // 暂时注释掉断路器配置，直到依赖问题解决
    /*
    @Bean
    public Customizer<Resilience4JCircuitBreakerFactory> defaultCustomizer() {
        return factory -> factory.configureDefault(id -> new Resilience4JConfigBuilder(id)
                .timeLimiterConfig(TimeLimiterConfig.custom()
                        .timeoutDuration(Duration.ofSeconds(3))
                        .build())
                .circuitBreakerConfig(CircuitBreakerConfig.custom()
                        .slidingWindowSize(10)
                        .failureRateThreshold(50)
                        .waitDurationInOpenState(Duration.ofSeconds(10))
                        .permittedNumberOfCallsInHalfOpenState(5)
                        .build())
                .build());
    }
    */
} 